#version 430 core

uniform float pointSize;
uniform mat4 projection;

out vec4 FragColor;

void main(){	
	vec3 normal;
	normal.xy = gl_PointCoord.xy * vec2(1.0, -1.0) + vec2(-0.5,0.5);
	float mag = dot(normal.xy, normal.xy);
	if(mag > 1.0) discard;
	normal.z = sqrt(1.0 - mag);
	FragColor = vec4(normal.z*0.005, 0.0, 0.0, 1.0);
}